﻿<script>
    function commit() {
        alert('1');
    }
</script>

@using (Ajax.BeginForm("Details",
    new AjaxOptions
    {
        UpdateTargetId = "textEntered",
        HttpMethod = "post",
        OnSuccess = "commit",
        InsertionMode = InsertionMode.InsertAfter

    }))
{

    @Html.TextArea("Comment", new { rows = 5, cols = 50 })
    <input type="submit" value="Submit" /><br />

<span id="textEntered">Nothing Entered</span>
}
